# Maintainer:
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=talloc
pkgver=2.4.0
pkgrel=3
pkgdesc="Hierarchical pool based memory allocator with destructors"
arch=('x86_64')
license=('GPL3')
url="https://talloc.samba.org/"
depends=('glibc' 'libxcrypt')
makedepends=('python' 'docbook-xsl')
optdepends=('python: for python bindings')
source=(https://www.samba.org/ftp/talloc/talloc-$pkgver.tar.{gz,asc})
sha512sums=('810d92a614d0b9e0ac6fe403c1643c4dda435f79c4627d3c3be228f94b4b2ee8e528efbbed07f7d1a16043d6e55bdf4f10826f31fb8ca1c649c4126ea09a3aff'
            'SKIP')
validpgpkeys=(9147A339719518EE9011BCB54793916113084025) # samba-bugs@samba.org

build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   ./configure --prefix=/usr \
     --sysconfdir=/etc/samba \
     --localstatedir=/var \
     --bundled-libraries=NONE \
     --builtin-libraries=replace \
     --enable-talloc-compat1
   make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
}
